﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui">
    <title>Babylon.js Editor</title>
</head>
<body>

    <div id="BABYLON-EDITOR-MAIN" style="width: 100%; height: 100%;"></div>
    <div id="BABYLON-EDITOR-UTILS" style="display: none;">
        <input type="file" id="BABYLON-EDITOR-LOAD-SCENE-FILE" multiple style="display: none;" />
        <input type="file" id="BABYLON-EDITOR-LOAD-TEXTURE-FILE" multiple style="display: none;" />
    </div>

    <!-- LIBS -->
    <script src="libs/preview bjs/babylon.max.js" type="text/javascript"></script>
    <script src="libs/cannon.js" type="text/javascript"></script>
    <script src="libs/ManipulationHelpers.js" type="text/javascript"></script>
    <script src="libs/jquery.min.js" type="text/javascript"></script>
    <script src="libs/w2ui-1.4.1.js" type="text/javascript"></script>
    <script src="libs/dat.gui.min.js" type="text/javascript"></script>
    <script src="libs/raphael.js" type="text/javascript"></script>

    <script src="libs/ace/ace.js" type="text/javascript"></script>
    <script src="libs/ace/mode-glsl.js" type="text/javascript"></script>
    <script src="libs/ace/mode-javascript.js" type="text/javascript"></script>
    <script src="libs/ace/theme-clouds.js" type="text/javascript"></script>

    <script src="libs/cytoscape/cytoscape.js" type="text/javascript"></script>

    <!-- GUI ELEMENTS -->
    <script src="sources/gui/babylon.editor.guiElement.js" type="text/javascript"></script>
    <script src="sources/gui/babylon.editor.guiPanel.js" type="text/javascript"></script>
    <script src="sources/gui/babylon.editor.guiLayouts.js" type="text/javascript"></script>
    <script src="sources/gui/babylon.editor.guiForm.js" type="text/javascript"></script>
    <script src="sources/gui/babylon.editor.guiGraph.js" type="text/javascript"></script>
    <script src="sources/gui/babylon.editor.guiEdit.js" type="text/javascript"></script>
    <script src="sources/gui/babylon.editor.guiToolbar.js" type="text/javascript"></script>
    <script src="sources/gui/babylon.editor.guiDialog.js" type="text/javascript"></script>
    <script src="sources/gui/babylon.editor.guiGrid.js" type="text/javascript"></script>
    <script src="sources/gui/babylon.editor.guiWindow.js" type="text/javascript"></script>
    <script src="sources/gui/babylon.editor.guiList.js" type="text/javascript"></script>

    <!-- INTERNAL FILES -->
    <script src="sources/internal/babylon.editor.event.js" type="text/javascript"></script>
    <script src="sources/internal/babylon.editor.tools.js" type="text/javascript"></script>
    <script src="sources/internal/babylon.editor.manipulationHelpers.js" type="text/javascript"></script>
    <script src="sources/internal/babylon.editor.testGame.js" type="text/javascript"></script>

    <!-- SCENE -->
    <script src="sources/scene/babylon.editor.sceneManager.js" type="text/javascript"></script>
    <script src="sources/scene/babylon.editor.sceneFactory.js" type="text/javascript"></script>
    <script src="sources/scene/babylon.editor.filesInput.js" type="text/javascript"></script>

    <!-- TOOLS -->
    <script src="sources/babylon.editor.sceneHelpers.js" type="text/javascript"></script>
    <script src="sources/babylon.editor.sceneGraphTool.js" type="text/javascript"></script>
    <script src="sources/babylon.editor.mainToolbar.js" type="text/javascript"></script>
    <script src="sources/babylon.editor.toolsToolbar.js" type="text/javascript"></script>
    <script src="sources/babylon.editor.sceneToolbar.js" type="text/javascript"></script>
    <script src="sources/babylon.editor.editPanel.js" type="text/javascript"></script>
    <script src="sources/babylon.editor.timeline.js" type="text/javascript"></script>
    <script src="sources/babylon.editor.statusBar.js" type="text/javascript"></script>

    <!-- EXPORTER -->
    <script src="sources/export/babylon.editor.projectExporter.js" type="text/javascript"></script>
    <script src="sources/export/babylon.editor.projectImporter.js" type="text/javascript"></script>
    <script src="sources/export/babylon.editor.exporter.js" type="text/javascript"></script>
    <script src="sources/export/babylon.editor.storageExporter.js" type="text/javascript"></script>

    <!-- MAIN FILES -->
    <script src="sources/babylon.editor.main.js" type="text/javascript"></script>
    <script src="sources/babylon.editor.core.js" type="text/javascript"></script>

    <!-- STORAGE -->
    <script src="sources/storage/babylon.editor.storage.js" type="text/javascript"></script>
    <script src="sources/storage/babylon.editor.oneDriveStorage.js" type="text/javascript"></script>

    <!-- EDITION TOOLS -->
    <script src="sources/babylon.editor.editionTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.abstractTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.abstractDatTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.generalTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.materialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.sceneTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.lightTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.animationTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.postProcesses.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.reflectionProbeTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.audioTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.particleSystemTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.lensFlareTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/babylon.editor.textureTool.js" type="text/javascript"></script>

    <script src="sources/editionTools/materialEditors/babylon.editor.abstractMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.skyMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.standardMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.pbrMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.waterMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.lavaMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.furMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.gradientMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.terrainMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.triPlanarMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.gridMaterialTool.js" type="text/javascript"></script>
    <script src="sources/editionTools/materialEditors/babylon.editor.fireMaterialTool.js" type="text/javascript"></script>

    <!-- USER INTERFACES -->
    <script src="../sources/userInterfaces/babylon.editor.particleSystemEditor.js" type="text/javascript"></script>
    <script src="../sources/userInterfaces/babylon.editor.objectPicker.js" type="text/javascript"></script>
    <script src="../sources/userInterfaces/babylon.editor.animationEditor.js" type="text/javascript"></script>
    <script src="../sources/userInterfaces/babylon.editor.launchEditor.js" type="text/javascript"></script>
    <script src="../sources/userInterfaces/babylon.editor.babylonExporter.js" type="text/javascript"></script>
    <script src="../sources/userInterfaces/babylon.editor.textureEditor.js" type="text/javascript"></script>
    <script src="../sources/userInterfaces/babylon.editor.actionsBuilder.js" type="text/javascript"></script>

    <!-- PLUGINS MANAGEMENT -->
    <script src="../sources/babylon.editor.pluginManager.js" type="text/javascript"></script>

    <!-- MATERIALS -->
    <script src="libs/materials/babylon.simpleMaterial.js" type="text/javascript"></script>
    <script src="libs/materials/babylon.skyMaterial.js" type="text/javascript"></script>
    <script src="libs/materials/babylon.gradientMaterial.js" type="text/javascript"></script>
    <script src="libs/materials/babylon.fireMaterial.js" type="text/javascript"></script>
    <script src="libs/materials/babylon.furMaterial.js" type="text/javascript"></script>
    <script src="libs/materials/babylon.gridMaterial.js" type="text/javascript"></script>
    <script src="libs/materials/babylon.lavaMaterial.js" type="text/javascript"></script>
    <script src="libs/materials/babylon.normalMaterial.js" type="text/javascript"></script>
    <script src="libs/materials/babylon.terrainMaterial.js" type="text/javascript"></script>
    <script src="libs/materials/babylon.triPlanarMaterial.js" type="text/javascript"></script>
    <script src="libs/materials/babylon.waterMaterial.js" type="text/javascript"></script>

    <!-- PLUGINS -->
    <script src="sources/plugins/babylon.editor.simpleMaterialTool.js" type="text/javascript"></script>

    <script src="sources/plugins/babylon.editor.lightsMenu.js" type="text/javascript"></script>
    <script src="sources/plugins/babylon.editor.geometriesMenu.js" type="text/javascript"></script>
    <script src="sources/plugins/babylon.editor.soundsMenu.js" type="text/javascript"></script>

    <script src="sources/plugins/mainTools/babylon.editor.toolsMenu.js" type="text/javascript"></script>
    <script src="sources/plugins/mainTools/babylon.editor.actionsBuilder.js" type="text/javascript"></script>
    <script src="sources/plugins/mainTools/babylon.editor.actionsBuilderGraph.js" type="text/javascript"></script>
    <script src="sources/plugins/mainTools/babylon.editor.actionsBuilderParametersEditor.js" type="text/javascript"></script>

    <script src="sources/plugins/mainTools/babylon.editor.postProcessBuilder.js" type="text/javascript"></script>

    <script src="sources/plugins/mainTools/babylon.editor.cosmosEditor.js" type="text/javascript"></script>

    <!-- ELECTRON -->
    <script src="sources/electron/babylon.editor.electronPlugin.js" type="text/javascript"></script>

    <!-- LOADERS -->
    <script src="libs/loaders/babylon.objFileLoader.js" type="text/javascript"></script>
    <script src="libs/loaders/babylon.stlFileLoader.js" type="text/javascript"></script>

    <!-- EXTENSIONS -->
    <script src="libs/preview release/babylon.editor.extensions.js" type="text/javascript"></script>

    <!-- STYLE -->
    <link rel="stylesheet" type="text/css" href="../css/w2ui-1.4.1.css" />
    <link rel="stylesheet" type="text/css" href="../css/babylon.editor.css" />
    <link rel="stylesheet" type="text/css" href="../css/dat.gui.css" />

    <!-- DEFAULT SCENE -->
    <script src="website/babylon.editor.defaultScene.js" type="text/javascript"></script>

    <script type="text/javascript">
        
        var editorMain = new BABYLON.EDITOR.EditorMain("BABYLON-EDITOR-MAIN");
        var core = editorMain.core;
        editorMain.createRenderLoop();

        // Default scene
        createDefaultScene(core);

        var textPlaneTexture = new BABYLON.DynamicTexture("dynamic texture", 512, core.currentScene, true);
        textPlaneTexture.drawText("Dynamic texture test", null, 400, "bold 20px verdana", "white", "transparent");
        textPlaneTexture.drawText("Second line for test", null, 500, "bold 20px verdana", "white", "transparent");
        textPlaneTexture.hasAlpha = true;

        editorMain._handleSceneLoaded()(null, core.currentScene);
        
        var animation = new BABYLON.Animation("anim", "fogStart", 1, BABYLON.Animation.ANIMATIONTYPE_FLOAT, BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE, true);
        animation.setKeys([
            { frame: 0, value: 0 },
            { frame: 5, value: 5 },
            { frame: 10, value: -5 },
            { frame: 15, value: -0 }
        ]);
        core.currentScene.animations.push(animation);
        BABYLON.EDITOR.SceneFactory.NodesToStart.push(core.currentScene);
        core.editor.timeline.reset();

        core.editor.sceneGraphTool.fillGraph();
        BABYLON.EDITOR.Event.sendSceneEvent(core.currentScene, BABYLON.EDITOR.SceneEventType.OBJECT_PICKED, core);
    </script>
</body>
</html>
